import request from '@/utils/request'

export function page(params) {
  return request({
    url: '/mall_product/admin/attr/page',
    method: 'get',
    params
  })
}

export function list_base(params) {
  return request({
    url: '/mall_product/admin/attr/base_list',
    method: 'get',
    params
  })
}
export function list_sale(params) {
  return request({
    url: '/mall_product/admin/attr/sale_list',
    method: 'get',
    params
  })
}

export function get(id) {
  return request({
    url: `/mall_product/admin/attr/${id}`,
    method: 'get'
  })
}

export function save(data) {
  return request({
    url: '/mall_product/admin/attr',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: '/mall_product/admin/attr',
    method: 'put',
    data
  })
}

export function deleteById(id) {
  return request({
    url: `/mall_product/admin/attr/${id}`,
    method: 'delete'
  })
}
